<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>
<%@page import="com.wxtf.platform.tools.FormatUtil"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	UserBean user = (UserBean)request.getSession().getAttribute("userBean");
	String _db = user.getDbType();
	Map<String,List<Map<String, String>>> dicMap = user.getDicMap();
	List<Map<String, String>> list = null;
	String temp = "";
	String curTime = FormatUtil.getCurentDate();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />

		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerForm.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerComboBox.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerDateEditor.js"></script>
		
		<script type="text/javascript" src="ligerUI/jquery-validation/jquery.validate.min.js" ></script> 
		<script type="text/javascript" src="ligerUI/jquery-validation/jquery.metadata.js"></script>
		<script type="text/javascript" src="ligerUI/jquery-validation/messages_cn.js" ></script>
<style>
	.minput{
		width: 60px;
		border:1px solid #fff;
		border-bottom: 1px solid #000;
		text-align: center;
		cursor: pointer;
	}
	.input2{
		border: 1px solid #fff;
		cursor: default;
	}
</style>		
<script type="text/javascript">
var _db = '<%=_db%>';
var thisyear;
var thismonth;
_jsonObj.classname = "com.wxtf.platform.main.report.MonthUsageReport";
_jsonObj.methodname = "queryPage";
_jsonObj.logicdata = "[{\"reportdate\":\"\"}]";
var _jsonDetail = {};
_jsonDetail.classname = "com.wxtf.platform.main.report.MonthUsageReport";
_jsonDetail.methodname = "selectDetail";
var _jsonAssess = {};
_jsonAssess.classname = "com.wxtf.platform.main.report.MonthUsageReport";
_jsonAssess.methodname = "selectAssess";
_jsonAssess.logicdata = "[{\"reportdate\":\"\"}]";
var tempdata; //用编辑模式存储临时表单数据
var win;//明细窗口
var dgrid;//明细表格
var isEdit = false;
var isRep = false;
$(function(){
	var arr	= '<%=curTime%>'.split('-');
	thisyear = arr[0];
	thismonth = arr[1];
	manager = $("#mgrid").ligerGrid({
		url: _url, parms: _jsonObj, width: '100%',height:document.body.clientHeight-220, headerRowHeight :30,
		usePager: true, rownumbers: true, alternatingRow: true,async:false,delayLoad: true,
		columns: [
			{ display: 'tmapm_id', name: 'tmapm_id', hide: true,width:1 },
			{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
			{ display: 'org_id', name: 'org_id', hide: true,width:1 },
			{ display: '姓名', name: 'tbe_name',width:80},
			{ display: '住址', name: 'tbe_address', width:100},
			{ display: '年龄', name: 'tbe_age', width: 40 },
			{ display: '职业', name: 'tbe_spell_code', width: 40 },
			{ display: '文化程度', name: 'tbe_qualification', width: 100,
				render: function(record, index, value, oth){
					<%
					list = dicMap.get("8");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%
						temp = map.get("tmgd_name");
						%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					return value;
				}
			},
			{ display: '子女数', name: 'tbfi_children_num', width: 60 },
			{ display: '使用药具名称', name: 'tmad_name', width: 100 },
			{ display: '用药具时间', name: 'tmapm_begin_time',width:100},
			{ display: '用药具理由', name: 'tmapm_reason', width: 70 },
			{ display: '曾用过何药具', name: 'tmapm_last_medicine', width: 100 },
			{ display: '有无失败史', name: 'tmapm_is_fail', width: 50 ,
				render: function(record, index, value, oth){
					var str="";
					if(value == 1){
						str = "有";
					}else{
						str = "无";
					}
					return str;
				}
			},
			{ display: '失败原因', name: 'tmapm_fail_reason', width: 100 },
		 	{ display: '月发放药具情况', columns:
            	[
		            { display: '单位', name: 'tmad_unit', width: 40 }, 
		            { display: '数量', name: 'tmapd_num', width: 40 },
		           	{ display: '发放形式', name: 'tmapm_style', width: 70 ,
						render: function(record, index, value, oth){
							var str="";
							if(value == 0){
								str = "发放";
							}else{
								str = "领用";
							}
							return str;
						}
					}
            	]
            },
			{ display: 'reserve1', name: 'reserve1', width:  1, hide:true },
			{ display: 'reserve2', name: 'reserve2', width:  1, hide:true },
			{ display: 'reserve3', name: 'reserve3', width:  1, hide:true },
			{ display: 'reserve4', name: 'reserve4', width:  1, hide:true },
			{ display: 'reserve5', name: 'reserve5', width:  1, hide:true },
			{ display: '录入人', name: 'create_by', width:  1, hide:true },
			{ display: '录入时间', name: 'create_time', width:  1, hide:true },
			{ display: '最后修改人', name: 'last_modify_by', width:  1, hide:true },
			{ display: '最后修改时间', name: 'last_modify_time', width: 1, hide:true }
		]
	}); 
	dgrid = $("#dgrid").ligerGrid({
		url: _url,parms: _jsonDetail, width: 775, height: 280, delayLoad: true,
		usePager: true, async:false, rownumbers: true,
		columns: [
			{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
			{ display: 'org_id', name: 'org_id', hide: true,width:1 },
			{ display: '机构名称', name: 'reserve1', width:150, align:'left' },
			{ display: '姓名', name: 'tbe_name', width: 100, align: 'left' },
			{ display: '性别', name: 'tbe_sex', width: 60, align: 'left' },
			{ display: '身份证号', name: 'tbe_idcard', width: 150, align: 'left' },
			{ display: '职工证号', name: 'tbe_work_permit',width:  1, hide:true  },
			{ display: '用工形式', name: 'tbe_employment_forms', width:  1, hide:true },
			{ display: '曾用名', name: 'tbe_former_name', width:  1, hide:true  },
			{ display: '拼音码', name: 'tbe_spell_code', width:  1, hide:true  },
			{ display: '出生日期', name: 'tbe_birthday', width: 100, align: 'left' },
			{ display: '年龄', name: 'tbe_age', width:  1, hide:true },
			{ display: '籍贯', name: 'tbe_native_palce', width:  1, hide:true  },
			{ display: '民族', name: 'tbe_nation', width:  1, hide:true },
			{ display: '出生地', name: 'tbe_birthplace', width:  1, hide:true },
			{ display: '入厂时间', name: 'tbe_join_time', width:  1, hide:true },
			{ display: '工龄', name: 'tbe_seniority', width:  1, hide:true },
			{ display: '手机', name: 'tbe_mobile', width:  1, hide:true },
			{ display: '家庭电话', name: 'tbe_family_phone', width: 100, align: 'left' },
			{ display: '家庭住址', name: 'tbe_address', width: 100, align: 'left' },
			{ display: '婚姻状态', name: 'tbe_marital_status', width: 100, align: 'left',width:  1, hide:true},
			{ display: '婚姻状况', name: 'tbe_marital_condition', width:  1, hide:true },
			{ display: '结婚时间', name: 'tbe_married_time', width:  1, hide:true },
			{ display: '结婚证号', name: 'tbe_marriage_certificate', width:  1, hide:true },
			{ display: '政治面貌', name: 'tbe_political_status', width:  1, hide:true },
			{ display: '学历', name: 'tbe_qualification', width:  1, hide:true },
			{ display: '毕业学校', name: 'tbe_graduate_college', width:  1, hide:true },
			{ display: '所学专业', name: 'tbe_major', width:  1, hide:true },
			{ display: '工作时间', name: 'tbe_work_area', width:  1, hide:true },
			{ display: '职务', name: 'tbe_position', width:  1, hide:true },
			{ display: '是否允许再生育', name: 'tbe_is_again_birth', width:  1, hide:true },
			{ display: '是否不孕症（绝经）', name: 'tbe_is_barrenness', width:  1, hide:true },
			{ display: '是否晚婚', name: 'tbe_is_late_marriage', width:  1, hide:true },
			{ display: '是否晚育', name: 'tbe_is_late_birth', width:  1, hide:true },
			{ display: '员工状态', name: 'tbe_status', width:  1, hide:true },
			{ display: '生育能力状态', name: 'tbe_ba_status', width:  1, hide:true },
			{ display: '节育措施', name: 'tbe_birth_control_measures', width:  1, hide:true },
			{ display: '设为重点时间', name: 'tbe_es_time', width:  1, hide:true },
			{ display: '是否重点服务对象', name: 'tbe_is_es', width:  1, hide:true },
			{ display: '重点理由', name: 'tbe_es_reason', width:  1, hide:true },
			{ display: '子女情况', name: 'tbe_children_status', width:  1, hide:true },
			{ display: '排序号', name: 'tbe_order', width:  1, hide:true },
			{ display: '备注', name: 'tbe_memo', width:  1, hide:true },
			{ display: '子女数', name: 'tbfi_children_num', width:  1, hide:true },
			{ display: '配偶姓名', name: 'tbfi_spouse_name', width:  1, hide:true }
		]
	});
	selectData();
	/*搜索*/
	$("#sel_btn").click(function(){
		if($("#hisYear").val() == '' || $("#hisMonth").val() == ''){
			warningTip('请设置历史日期！');
			return;
		}
		thisyear = $("#hisYear").val();
		thismonth = $("#hisMonth").val();
		
		_jsonAssess.methodname = "selectAssess";
		_jsonAssess.logicdata = "[{\"reportdate\":\""+thisyear+"-"+thismonth+"\"}]";
		_jsonObj.methodname = "queryPage";
		_jsonObj.logicdata = "[{\"reportdate\":\""+thisyear+"-"+thismonth+"\"}]";
		selectData();
	});
	/*取消*/
	$("#cancel_btn").click(function(){
		$("#his").hide();
		$("#his_btn").show();
		$("#btns").show();
		$("#cancel_btn").hide();
		$("#edit_btn").val('编辑');
		loadForm("mform", tempdata);
		isEdit = false;
		$(".minput").css("cursor","pointer");
	});
	
	$(".minput").blur(function(){
		if(isEdit){
		    $(this).css("border","1px solid #fff");
			$(this).css("border-bottom","1px solid #000");
		}
	});
	$(".input2").blur(function(){
		if(isEdit){
			$(this).css("border","1px solid #fff");
		}
	});
	$(".minput,.input2").focus(function(){
		if(isEdit){
	  		$(this).css({border:"1px solid #333333"});
	  	}else{
	  		$(this).blur();
	  	}
	});
	$(".minput,.input2").hover(
	  function () {
	  	if(isEdit){
	  		$(this).css({background:"#999999"});
	  	}
	  },
	  function () {
	  	if(isEdit){
		    $(this).css("background","#fff");
		}
	  }
	);
	
});
/*查看按钮点击触发*/
function setDate(){
	$("#his_btn").hide();
	$("#his").show();
}
/*获取统计数据*/
function selectData(){
	_jsonAssess.methodname = "selectAssess";
	_jsonObj.methodname = "queryPage";
	callserver(_jsonAssess, getDataSucc, function(){alert("s");});
}
/*获取统计数据成功*/
function getDataSucc(data, textStatus){
	if(data.length > 0){
		document.getElementById('mform').reset();
		$("#tmamr_id").val("");
		loadForm("mform", data[0]);
		if(data[0].tmamr_date == undefined){
			$("#rptitle").html(thisyear+'年('+thismonth+')月使用药具情况报告单');
			$("#ryear").val(thisyear);
			$("#rmonth").val(thismonth);
			$("#ym").html(thisyear+' 年 '+thismonth+' 月');
			$("#rday").val('<%=curTime%>'.split('-')[2]);
		}else{
			var arr = data[0].tmamr_date.split("-");
			$("#rptitle").html(arr[0]+'年('+arr[1]+')月使用药具情况报告单');
			$("#ym").html(arr[0]+' 年 '+arr[1]+' 月');
			$("#rday").val(arr[2]);
			$("#ryear").val(arr[0]);
			$("#rmonth").val(arr[1]);
		}
		if(data[0].tmamr_id == "" || data[0].tmamr_id == null || data[0].tmamr_id == undefined){
			$("#tm").html(thisyear+'年'+thismonth+'月');
			$("#t1").show();
			$("#mform").hide();
			isRep = false;
			$("#exp_btn").hide();
			$("#edit_btn").hide();
			$("#save_btn").hide();
		}else{
			isRep = true;
			manager.loadData();
			$("#t1").hide();
			$("#mform").show();
			$("#exp_btn").show();
			$("#edit_btn").show();
			$("#save_btn").hide();
		}
	}else{
		_jsonAssess.methodname = "selectAssess";
		_jsonAssess.logicdata = "[{\"reportdate\":\"\"}]";
		selectData();
	}
}
/*快速生成预览*/
function doCreate(){
	manager.loadData();
	$("#t1").hide();
	$("#mform").show();
	$("#save_btn").show();
	$("#exp_btn").show();
	$("#edit_btn").show();
}
/*显示明细*/
function showDetail(title,type){
	/**if(isEdit){return;}
	if(win == null){
		win = initWindowByDiv2('mdiv',title+"明细", 800, 350 ,closeDetail);
	}else{
		win.show();
	}
	_jsonDetail.logicdata="[{\"type\":\""+type+"\",\"ryear\":\""+thisyear+"\",\"rmonth\":\""+thismonth+"\",\"rday\":\""+$("#rday").val()+"\"}]";
	dgrid.loadData();*/
}
/*关闭明细*/
function closeDetail(title,type){
	win.hide();
}
/*新建上报*/
function dosubmit(){
	_jsonAssess.logicdata = getForm("mform");
	var tmamr_id = $("#tmamr_id").val();
	if($("#rday").val() == ''){
		warningTip('请填写上报日期！');
		return;
	}
	var d = $("#ym").html().replaceAll(" ","").replace("年","-").replace("月","-")+$("#rday").val();
	var m = /^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(d);
	if(!m){
		warningTip('填报日期格式不正确，正确的格式如:2000年01月01');
		return;
	}
	if(tmamr_id == ''){
		_jsonAssess.methodname = "save";
		callserver(_jsonAssess, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
	} 
 	if(tmamr_id != ''){
		_jsonAssess.methodname = "update";
		callserver(_jsonAssess, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
	}
}
/*暂存*/
function savetemp(){
	if(isEdit){
		if($("#rday").val() == ''){
			warningTip('请填写上报日期！');
			return;
		}
		if($("#tmamr_director").val() == ''){
			warningTip('单位负责人不能为空！');
			return;
		}
		var d = $("#ym").html().replaceAll(" ","").replace("年","-").replace("月","-")+$("#rday").val();
		var m = /^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(d);
		if(!m){
			warningTip('填报日期格式不正确，正确的格式如:2000年01月01');
			return;
		}
		isEdit = false;
		$("#btns").show();
		$("#cancel_btn").hide();
		$("#edit_btn").val('编辑');
		$("#edit_btn").attr('title','切换到编辑模式');
		$(".minput").css("cursor","pointer");
		$("#save_btn").show();
		succMsgTip("提醒：请不要忘记提交。");
	}else{
		tempdata = JSON.parse(getForm("mform"))[0];
		$("#btns").hide();
		$("#cancel_btn").show();
		$("#edit_btn").val('暂存');
		$("#edit_btn").attr('title','保存修改并返回到预览模式');
		$(".minput").css("cursor","text");
		isEdit = true;
	}
}
function ajaxCallbackSuccFunc(data, satus){
	$("#save_btn").hide();
	succMsgTip(data.resultrecord);
}
function ajaxCallbackErrorFunc(data, satus){
	succMsgTip(data.resultrecord);
}
//导出EXECL
function expexcel(){
	_jsonObj.methodname = "expxls";
	_jsonObj.logicdata = '[{"reportdate":"'+thisyear+'-'+thismonth+'","title":"'+thisyear+'年('+
	thismonth+')月使用药具情况报告单","org_name":"'+$("#org_name").val()+
	'","tmamr_matron_num":"'+$("#tmamr_matron_num").val()+
	'","tmamr_women_fertility_num":"'+$("#tmamr_women_fertility_num").val()+
	'","tmamr_ligation_num":"'+$("#tmamr_ligation_num").val()+
	'","tmamr_sheung_wan_num":"'+$("#tmamr_sheung_wan_num").val()+
	'","tmamr_skinburied_num":"'+$("#tmamr_skinburied_num").val()+
	'","tmamr_thismonth_birth_num":"'+$("#tmamr_thismonth_birth_num").val()+
	'","tmamr_keep_certificate_num":"'+$("#tmamr_keep_certificate_num").val()+
	'","tmamr_unmarry_num":"'+$("#tmamr_unmarry_num").val()+
	'","tmamr_widowed_num":"'+$("#tmamr_widowed_num").val()+
	'","tmamr_barrenness_num":"'+$("#tmamr_barrenness_num").val()+
	'","tmamr_menopause_num":"'+$("#tmamr_menopause_num").val()+
	'","tmamr_director":"'+$("#tmamr_director").val()+
	'","tmamr_time":"'+thisyear+'年'+thismonth+'月'+$("#rday").val()+'日"}]';
	callserver(_jsonObj, function(data, textStatus){
		
		if(data.result){
			downloadFile(data.resultrecord);
		} else {
			succMsgTip(data.resultrecord);
		}
		
	},function(data, textStatus){
	});
}
//校验年控制字符输出
function ckyear(a){
	var str = a.replace(/\D/g,'');
	str = str.substring(0,4);
	return str;
}
</script>
</head>
	<body style="overflow: auto;overflow-x:hidden;background-color: #fff;font-family: '黑体'">
		<div style="margin-top: 5px;" >
			<input class="btn2" id="edit_btn" value="编辑" type="button" onclick="savetemp()" style="display: none;" title="切换到编辑模式"/>
			<input class="btn2" id="cancel_btn" value="取消" type="button" style="display: none;" title="撤销修改并返回到预览模式"/>
			<span id="btns">
				<input class="btn2" id="save_btn" value="提交" type="button" onclick="dosubmit()" style="display: none;"/>
				<input class="btn2" id="exp_btn" value="导出" type="button" onclick="expexcel();" style="display: none;" title="导出Excel并下载到本地"/>
				<input class="btn2" id="his_btn" value="查询|新建" type="button" onclick="setDate();"/>
				<span id="his" style="display: none; width: 800px;">
					<input id="hisYear" type="text" class="textbg1" value="" onblur="this.value=ckyear(this.value);" onkeyup="this.value=ckyear(this.value);" style="width: 40px;height: 18px;"/>年
					<select id="hisMonth" name="hisMonth" class="textbg1" style=" width: 40px;height: 20px;">
						<option value="01">1</option>
						<option value="02">2</option>
						<option value="03">3</option>
						<option value="04">4</option>
						<option value="05">5</option>
						<option value="06">6</option>
						<option value="07">7</option>
						<option value="08">8</option>
						<option value="09">9</option>
						<option value="10">10</option>
						<option value="11">11</option>
						<option value="12">12</option>
					</select>月
					<input class="btn2" id="sel_btn" value="搜索" type="button"/>
				</span>
			</span>
		</div>
		<div id="t1" style="padding-left: 50px;height: 40px;font-size: 20px;text-align: justify;margin-top: 70px;display: none;">
			<p id="tm"></p>
			<br/>该月未生成报表，您可以点击
			<input class="btn2" value="生成" onclick="doCreate()" type="button" style="font-size: 15px;"/>生成该月报表预览,
			<br/>也可以通过上方的“查询|新建”按钮查看或生成指定月份的报表预览。
			<br/>生成预览后可以通过“编辑”按钮切换到编辑模式。
			<br/>说明：编辑模式可以修改报表内容，预览模式可以查看明细。
			<br/>提醒：请不要忘了点击“提交”按钮将数据提交。
		</div>
		<form id="mform" name="mform">
		<input type="hidden" id="tmamr_id" name="tmamr_id" value="" />
		<input type="hidden" id="org_id" name="org_id" value="" />
		<input type="hidden" id="reserve1" name="reserve1" value="" />
		<input type="hidden" id="reserve2" name="reserve2" value="" />
		<input type="hidden" id="reserve3" name="reserve3" value="" />
		<input type="hidden" id="reserve4" name="reserve4" value="" />
		<input type="hidden" id="reserve5" name="reserve5" value="" />
		<input type="hidden" id="create_by" name="create_by" value="" />
		<input type="hidden" id="create_time" name="create_time" value="" />
		<input type="hidden" id="last_modify_by" name="last_modify_by" value="" />
		<input type="hidden" id="last_modify_time" name="last_modify_time" value="" />
		<input type="hidden" id="tmamr_date" name="tmamr_date" value="" />
		<input type="hidden" id="ryear" name="ryear" value="" />
		<input type="hidden" id="rmonth" name="rmonth" value="" />
		<div id="rptitle" style="height: 40px;font-size: 30px;text-align: center;margin-top: 5px;">
			年()月使用药具情况报告单</div>
		<div style="height: 20px;font-size: 20px;text-align: left;margin-top: 5px;">填报单位:
		<input id="org_name" type="text" style="border:0;" value="<%=user.getCurOrgName()%>" />
		</div>
		<div id="mgrid" style="margin-top: 5px;"></div>
		<div style="font-size: 15px;text-align: left;margin-top: 5px;">注:(1)已婚育龄妇女
			<input id="tmamr_matron_num" name="tmamr_matron_num" type="text" value="0" class="minput" onclick="showDetail('已婚育龄妇女明细',this.name)"/>人,
			已婚有生育条件的育龄妇女
			<input id="tmamr_women_fertility_num" name="tmamr_women_fertility_num" value="0"  class="minput" onclick="showDetail('已婚有生育条件的育龄妇女',this.name)"/>人,
			已结扎
			<input id="tmamr_ligation_num" name="tmamr_ligation_num" type="text" value="0" class="minput" onclick="showDetail('已结扎',this.name)"/>人,
			已上环
			<input id="tmamr_sheung_wan_num" name="tmamr_sheung_wan_num" type="text" value="0" class="minput" onclick="showDetail('已上环',this.name)"/>人,
			皮埋
			<input id="tmamr_skinburied_num" name="tmamr_skinburied_num" type="text" value="0" class="minput" onclick="showDetail('皮埋',this.name)"/>人。
		</div>
		<div style="font-size: 15px;text-align: left;margin-top: 5px;margin-left: 18px;">(2)本月出生
			<input id="tmamr_thismonth_birth_num" name="tmamr_thismonth_birth_num" type="text" value="0" class="minput" />人,
			已孕等孕
			<input id="tmamr_keep_certificate_num" name="tmamr_keep_certificate_num" type="text" value="0" class="minput" onclick="showDetail('已孕等孕',this.name)"/>人。
		</div>
		<div style="font-size: 15px;text-align: left;margin-top: 5px;margin-left: 18px;">(3)离婚
			<input id="tmamr_unmarry_num" name="tmamr_unmarry_num" value="0" type="text" class="minput"  onclick="showDetail('离婚',this.name)"/>人,
			丧偶
			<input id="tmamr_widowed_num" name="tmamr_widowed_num" value="0" type="text" class="minput"  onclick="showDetail('丧偶',this.name)"/>人,
			不孕症
			<input id="tmamr_barrenness_num" name="tmamr_barrenness_num" value="0" type="text" class="minput"  onclick="showDetail('不孕症',this.name)"/>人,
			绝经
			<input id="tmamr_menopause_num" name="tmamr_menopause_num" value="0" type="text" class="minput"  onclick="showDetail('绝经',this.name)"/>人。
		</div>
		<div style="font-size: 15px;text-align: left;margin-top: 5px;">单位负责人:
			<input id="tmamr_director" name="tmamr_director" type="text" class="input2" style="width: 150px;text-align: left;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			填表人:
			<input type="text" readonly="readonly" style="border:0;width: 150px;text-align: left;" value="<%=user.getUserrelName() %>" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			填报日期:
			<span id="ym"  style="width: 60px;text-align: center;" ></span>
			<input id="rday" name="rday" type="text" class="input2" style="width: 20px;text-align: center;" />日
		</div>
		</form>
		<div id="mdiv" style="display: none;">
			<div id="dgrid"></div>
		</div>
	</body>
</html>
